import request from '@/utils/request';

// 根据分类ID查询标签信息列表
export function listByCategoryId(categoryId) {
  return request({
    url:`/article/api/label/getByCategoryId/${categoryId}`,
    method:'get'
  })
}

// 根据创建者ID获取标签列表
export function getListByCreaterId() {
  return request({
    url:`/article/api/label/getListByCreaterId`,
    method:'get'
  })
}

// 查询标签列表
export function list(data = {}) {
  return request({
    url:`/article/api/label/list`,
    method:'POST',
    data
  })
}

// 创建标签
export function createLabel(data = {}) {
  return request({
    url:`/article/label/create`,
    method:'POST',
    data
  })
}

// 编辑标签
export function editLabel(data = {}) {
  return request({
    url:`/article/label/edit`,
    method:'POST',
    data
  })
}

// 删除标签
export function deleteLabel(data = {}) {
  return request({
    url:`/article/label/delete`,
    method:'POST',
    data
  })
}

// 查询标签详情信息
export function labelInfo(labelId) {
  return request({
    url:`/article/api/label/info/${labelId}`,
    method:'GET'
  })
}

// 获取所有的标签
export function allLabel() {
  return request({
    url:`/article/label/allLabel`,
    method:'GET'
  })
}


